let request = require("./request")
const getuser = (data) => request('/api/wx_user/wxuser', 'get', data)
const postuser = (data) => request('/api/wx_user/wxuser', 'post', data)
const putuser = (data) => request("/api/wx_user/wxuser", 'put', data)
const getuserhouse = (data) => request("/api/wx_user/wxuser/house/", 'get', data)//查询用户房屋
const postuserhouse = (data) => request("/api/wx_user/wxuser/house/", 'post', data)//用户绑定房屋
const deluserhouse = (data) => request("/api/wx_user/wxuser/house/", 'delete', data)//用户删除房屋
const getcommunity = (data) => request('/api/wx_user/community/', 'get', data)//获取小区
const getbuilding = (data) => request('/api/wx_user/community/building/', 'get', data)//获取小区楼栋
const getunit = (data) => request('/api/wx_user/community/unit/', 'get', data)//获取小区单元
const gethouse = (data) => request('/api/wx_user/community/house/', 'get', data)//获取小区房屋
const getbill = (data) => request('/api/wx_user/wxuser/house_bill/', 'get', data)//查找用户房屋账单
const getorder = (data) => request('/api/wx_user/wxuser/recharge_order/', 'get', data)//获取订单列表
const postorder = (data) => request('/api/wx_user/wxuser/recharge_order/', 'post', data)//创建支付订单
const image = (data) => request('/api/admin/tcb_token', 'post', data)

module.exports = {
  getuser, postuser, putuser,
  getuserhouse, postuserhouse, deluserhouse,
  getcommunity, getbuilding, getunit, gethouse,
  getbill, getorder, postorder, image
}
